<template>
    <div class="sidebar">
        <el-menu :default-active="onRoutes" background-color="rgba(51,58,77,1)" class="el-menu-vertical-demo"  router>
            <template v-for="item in items">
                <template v-if="item.subs">
                    <el-submenu :index="item.index" :key="item.index">
                        <template slot="title"><i :class="item.icon"></i>{{ $t(item.title) }}</template>
                        <el-menu-item v-for="(subItem,i) in item.subs" :key="i" :index="subItem.index">{{ $t(subItem.title) }}
                        </el-menu-item>
                    </el-submenu>
                </template>
                <template v-else>
                    <el-menu-item :index="item.index" :key="item.index">
                        <i :class="item.icon"></i>{{ $t(item.title) }}
                    </el-menu-item>
                </template>
            </template>
        </el-menu>
    </div>
</template>

<script>
    export default {
      data () {
        return {
          items: [],
          headerTitle: ''
        }
      },
      computed: {
        onRoutes () {
          return this.$route.path.replace('/', '')
        }
      },
      methods: {
        sidebar () {
          let list = JSON.parse(sessionStorage.getItem('list'))
          let item = []
          let _this = this
          list.forEach(value => {
            
            if(value){
              // 工作台
              if (value.uniqueSign == 'MENU_WORKS') {
                item.push({icon: 'el-icon-shop-shouye', index: 'adminhome', title: 'sidebar.adminHome'})
              }

              // 用户管理
              if (value.uniqueSign == 'MENU_USER') {
                item.push({icon: 'el-icon-shop-user',
                  index: '3',
                  title: 'sidebar.userManage',
                  subs: [
                  ]
                })
              }
              // 用户列表
              if (value.uniqueSign == 'MENU_USER_LIST') {
                item.filter(index => {
                  return index.index == '3'
                })[0].subs.push({index: 'userlist', title: 'sidebar.userList'})
              }
              // 用户建议
              if (value.uniqueSign == 'MENU_USER_FEEDBACK') {
                item.filter(index => {
                  return index.index == '3'
                })[0].subs.push({index: 'usersug', title: 'sidebar.userSuggest'})
              }
              
              // 借款管理
              if (value.uniqueSign == 'MENU_LOAN') {
                item.push({icon: 'el-icon-shop-chanpin2',
                  index: '4',
                  title: 'sidebar.loanManage',
                  subs: [
                  ]
                })
              }
              // 接口列表
              if (value.uniqueSign == 'MENU_LOAN_LIST') {
                item.filter(index => {
                  return index.index == '4'
                })[0].subs.push({index: 'loanmoney', title: 'sidebar.loanMoneyList'})
              }
              // 放款列表
              if (value.uniqueSign == 'MENU_LOAN_LENDING') {
                item.filter(index => {
                  return index.index == '4'
                })[0].subs.push({index: 'putmoney', title: 'sidebar.putMoneyList'})
              }
              // 还款列表
              if (value.uniqueSign == 'MENU_LOAN_REPAY') {
                item.filter(index => {
                  return index.index == '4'
                })[0].subs.push({index: 'backmoney', title: 'sidebar.backMoneyList'})
              }
              // 还款待处理列表
              if (value.uniqueSign == 'MENU_LOAN_REPAY_PROCESSED') {
                item.filter(index => {
                  return index.index == '4'
                })[0].subs.push({index: 'backmoneyawait', title: 'yn.no13'})
              }
              // 放款待处理列表
              if (value.uniqueSign == 'MENU_LOAN_LENDING_PROCESSED') {
                item.filter(index => {
                  return index.index == '4'
                })[0].subs.push({index: 'putmoneyawait', title: 'yn.no14'})
              }

              // 风控审核管理
              if (value.uniqueSign == 'MENU_RISKCONTROL') {
                item.push({icon: 'el-icon-shop-zhengxin',
                  index: '5',
                  title: 'sidebar.riskManage',
                  subs: []
                })
              }
              // 人工初审列表
              if (value.uniqueSign == 'MENU_RISKCONTROL_FIRST') {
                item.filter(index => {
                  return index.index == '5'
                })[0].subs.push({index: 'peopleFirstAudit', title: 'sidebar.labourAuditListOne'})
              }
              // 人工复审列表
              if (value.uniqueSign == 'MENU_RISKCONTROL_REVIEW') {
                item.filter(index => {
                  return index.index == '5'
                })[0].subs.push({index: 'peopleSecondAudit', title: 'sidebar.labourAuditListTwo'})
              }
              // 人工初审统计
              if (value.uniqueSign == 'MENU_RISKCONTROL_RPT') {
                item.filter(index => {
                  return index.index == '5'
                })[0].subs.push({index: 'peopleFirstAuditTotal', title: 'sidebar.labourAuditTotalOne'})
              }
              // 人工复审统计
              if (value.uniqueSign == 'MENU_RISKCONTROL_RPT_REVIEW') {
                item.filter(index => {
                  return index.index == '5'
                })[0].subs.push({index: 'peopleSecondAuditTotal', title: 'sidebar.labourAuditTotalTwo'})
              }
              // 人审数据查看
              if (value.uniqueSign == 'MENU_MANUAL_REVIEW_DATA_STATISTICS') {
                item.filter(index => {
                  return index.index == '5'
                })[0].subs.push({index: 'peopleAuditDataSelect', title: 'add.no17'})
              }
              // 驳回统计查看
              if (value.uniqueSign == 'MENU_MACHINE_REJECT_RPT') {
                item.filter(index => {
                  return index.index == '5'
                })[0].subs.push({index: 'machineAuditRejectSelect', title: 'add.no39'})
              }

              // 我的审核管理
              if (value.uniqueSign == 'MENU_ME') {
                item.push({icon: 'el-icon-shop-wenjian',
                  index: '2',
                  title: 'sidebar.myAuditOrder',
                  subs: [
                  ]
                })
              }
              // 我的人工初审
              if (value.uniqueSign == 'MENU_ME_FIRST') {
                item.filter(index => {
                  return index.index == '2'
                })[0].subs.push({index: 'myFirstAuditList', title: 'sidebar.myLabourAuditOne'})
              }
              // 我的人工复审
              if (value.uniqueSign == 'MENU_ME_REVIEW') {
                item.filter(index => {
                  return index.index == '2'
                })[0].subs.push({index: 'mySecondtAuditList', title: 'sidebar.myLabourAuditTwo'})
              }

              // 财务数据
              if (value.uniqueSign == 'MENU_ACCOUNT') {
                item.push({icon: 'el-icon-shop-chanpin3fankui',
                  index: '1',
                  title: 'sidebar.financialData',
                  subs: []
                })
              }
              // 放款日志列表
              if (value.uniqueSign == 'MENU_ACCOUNT_LENDING') {
                item.filter(index => {
                  return index.index == '1'
                })[0].subs.push({index: 'putloglist', title: 'sidebar.putMoneyLog'})
              }
              // 还款日志列表
              if (value.uniqueSign == 'MENU_ACCOUNT_REPAY') {
                item.filter(index => {
                  return index.index == '1'
                })[0].subs.push({index: 'backloglist', title: 'sidebar.backMoneyLog'})
              }
              //    财务报表
              if (value.uniqueSign == 'MENU_ACCOUNT_REPORT') {
                item.filter(index => {
                  return index.index == '1'
                })[0].subs.push({index: 'financetable', title: 'finance.crumbsFour'})
              }
              //    财务统计报表
              if (value.uniqueSign == 'MENU_FINANCIALSTATISTICS_REPORT') {
                item.filter(index => {
                  return index.index == '1'
                })[0].subs.push({index: 'financeTableTotal', title: 'add.no94'})
              }

              // 产品管理
              if (value.uniqueSign == 'MENU_PRODUCT') {
                item.push({icon: 'el-icon-shop-shujutongji',
                  index: '6',
                  title: 'sidebar.productManage',
                  subs: []
                })
              }
              // 产品列表
              if (value.uniqueSign == 'MENU_PRODUCT_LIST') {
                item.filter(index => {
                  return index.index == '6'
                })[0].subs.push({index: 'promanage', title: 'sidebar.productList'})
              }
              // 问题列表
              if (value.uniqueSign == 'MENU_PRODUCT_PROBLEM') {
                item.filter(index => {
                  return index.index == '6'
                })[0].subs.push({index: 'faq', title: 'proManage.crumbsThree'})
              }
              // app包管理
              if (value.uniqueSign == 'MENU_PRODUCT_APP_PACKAGE_MANAGE') {
                item.filter(index => {
                  return index.index == '6'
                })[0].subs.push({index: 'apppackagemag', title: 'proManage.crumbsFour'})
              }
              // 额度设置
              // if (value.uniqueSign == 'MENU_PRODUCT_APP_PACKAGE_MANAGE') {
              //   item.filter(index => {
              //     return index.index == '6'
              //   })[0].subs.push({index: 'apppackagemag', title: 'proManage.crumbsFour'})
              // }
              // 逾期分期
              if (value.uniqueSign == 'MENU_OVERDUE_INSTALMENT_PRODUCT') {
                item.filter(index => {
                  return index.index == '6'
                })[0].subs.push({index: 'overdueStages', title: 'proManage.crumbsFive'})
              }

              // 运营管理
              if (value.uniqueSign == 'MENU_OPERATE') {
                item.push({icon: 'el-icon-tickets',
                  index: '14',
                  title: 'sidebar.operator',
                  subs: []
                })
              }
              // 优惠券设置
              if (value.uniqueSign == 'MENU_OPERATE_COUPON') {
                item.filter(index => {
                  return index.index == '14'
                })[0].subs.push({index: 'couponSetting', title: 'couponSetting.crumbsTwo'})
              }
              // 推广计划列表
              if (value.uniqueSign == 'MENU_OPERATE_ACTIVITY') {
                item.filter(index => {
                  return index.index == '14'
                })[0].subs.push({index: 'activity', title: 'activity.crumbsTwo'})
              }
              // 优惠券使用
              if (value.uniqueSign == 'MENU_OPERATE_COUPON_USE') {
                item.filter(index => {
                  return index.index == '14'
                })[0].subs.push({index: 'couponUsed', title: 'couponUsed.crumbsTwo'})
              }
              // 其它优惠券
              if (value.uniqueSign == 'MENU_OTHER_COUPON') {
                item.filter(index => {
                  return index.index == '14'
                })[0].subs.push({index: 'otherCoupons', title: 'otherCoupons.crumbsTwo'})
              }
              // 推广计划列表
              if (value.uniqueSign == 'MENU_PROMOT_PLAN') {
                item.filter(index => {
                  return index.index == '14'
                })[0].subs.push({index: 'popularizeList', title: 'popularizeList.crumbsTwo'})
              }
              // 内置消息推送
              if (value.uniqueSign == 'MENU_PROMOT_PLAN') {
                item.filter(index => {
                  return index.index == '14'
                })[0].subs.push({index: 'buildinnoteput', title: 'operatorManage.no2'})
              }
              // 手动消息推送
              if (value.uniqueSign == 'MENU_PROMOT_PLAN') {
                item.filter(index => {
                  return index.index == '14'
                })[0].subs.push({index: 'manualnoteput', title: 'operatorManage.no1'})
              }

              // 运营数据
              if (value.uniqueSign == 'MENU_RECORD') {
                item.push({icon: 'el-icon-shop-shujutongji',
                  index: '12',
                  title: 'sidebar.operatorData',
                  subs: []
                })
              }
              // 邀请好友
              if (value.uniqueSign == 'MENU_RECORD_INVITE') {
                item.filter(index => {
                  return index.index == '12'
                })[0].subs.push({index: 'inviteFriend', title: 'inviteFriend.crumbsTwo'})
              }
              // 现金提现
              if (value.uniqueSign == 'MENU_RECORD_WITHDRAW') {
                item.filter(index => {
                  return index.index == '12'
                })[0].subs.push({index: 'cash', title: 'cash.crumbsTwo'})
              }
              // 渠道数据
              if (value.uniqueSign == 'MENU_CHANNEL_DATA') {
                item.filter(index => {
                  return index.index == '12'
                })[0].subs.push({index: 'channelData', title: 'channelData.crumbsTwo'})
              }
              if (value.uniqueSign == 'MENU_BLACK_RATE_DATA') {
                item.filter(index => {
                  return index.index == '12'
                })[0].subs.push({index: 'BlackUserListRate', title: 'channelData.no17'})
              }
      
              // 贷后运营
              if (value.uniqueSign == 'MENU_LOANS_OPERATES') {
                item.push({icon: 'el-icon-star-on',
                  index: '11',
                  title: 'sidebar.loanAfterOperates',
                  subs: []
                })
              }
              // 催收短信列表
              if (value.uniqueSign == 'MENU_LOANS_OPERATES_SMS') {
                item.filter(index => {
                  return index.index == '11'
                })[0].subs.push({index: 'collectionSMS', title: 'sidebar.noteTemplate'})
              }
              // 总催回报表
              if (value.uniqueSign == 'MENU_LOANS_OPERATES_RPT') {
                item.filter(index => {
                  return index.index == '11'
                })[0].subs.push({index: 'collectionReport', title: 'sidebar.comeTable'})
              }

              // 贷后管理 
              if (value.uniqueSign == 'MENU_LOANLAST') {
                item.push({icon: 'el-icon-view',
                  index: '10',
                  title: 'sidebar.loanAfterManage',
                  subs: []
                })
              }
              // 入催订单列表
              if (value.uniqueSign == 'MENU_LOANLAST_INCOME') {
                item.filter(index => {
                  return index.index == '10'
                })[0].subs.push({index: 'inTheRushOrders', title: 'sidebar.comeOrderList'})
              }
              // 逾期分期订单列表
              if (value.uniqueSign == 'MENU_LOANLAST_INCOME_OVERDUE_INSTALMENT') {
                item.filter(index => {
                  return index.index == '10'
                })[0].subs.push({index: 'overDueInstalment', title: 'add.no3'})
              }
              // 每日派单统计
              if (value.uniqueSign == 'MENU_DISTRIBUTION_STATISTICS_DAY') {
                item.filter(index => {
                  return index.index == '10'
                })[0].subs.push({index: 'everyDaySendOrdersTotal', title: 'sidebar.todayOperatesTotal'})
              }
              // 每日催回统计
              if (value.uniqueSign == 'MENU_COLLECTION_STATISTICS_DAY') {
                item.filter(index => {
                  return index.index == '10'
                })[0].subs.push({index: 'everyDayPushBackTotal', title: 'sidebar.todaycuihuiTotal'})
              }
              // 催收员催收统计
              if (value.uniqueSign == 'MENU_COLLECTOR_STATISTICS') {
                item.filter(index => {
                  return index.index == '10'
                })[0].subs.push({index: 'debtCollectorTotal', title: 'sidebar.adminTotal'})
              }
              // 委外资源池
              if (value.uniqueSign == 'MENU_OUTSOURCING_RESOURCE_POOL') {
                item.filter(index => {
                  return index.index == '10'
                })[0].subs.push({index: 'outsourcedresourcepool', title: 'loanAfterManage.no1'})
              }

              //  审核管理  
              if (value.uniqueSign == 'MENU_AUDIT_MANAGEMENT') {
                item.push({icon: 'el-icon-printer',
                  index: '16',
                  title: 'auditManage.no1',
                  subs: []
                })
              }
              // 逾期优惠券申请
              if (value.uniqueSign == 'MENU_OVERDUE_COUPON') {
                item.filter(index => {
                  return index.index == '16'
                })[0].subs.push({index: 'overdueCouponApply', title: 'loanAfterManage.crumbsSeven'})
              }
              // 部分还款申请
              if (value.uniqueSign == 'MENU_PARTIAL_REPAYMENT_APPLICATION') {
                item.filter(index => {
                  return index.index == '16'
                })[0].subs.push({index: 'partialRepaymentApply', title: 'loanAfterManage.crumbsEight'})
              }
              // 生成还款码
              if (value.uniqueSign == 'MENU_REPAYMENT_CODE') {
                item.filter(index => {
                  return index.index == '16'
                })[0].subs.push({index: 'paymentcode', title: 'loanAfterManage.crumbssix'})
              }
              // 他人还款审核
              if (value.uniqueSign == 'MENU_OTHER_REPAYMENT') {
                item.filter(index => {
                  return index.index == '16'
                })[0].subs.push({index: 'otherBackAudit', title: 'yn.no36'})
              }
              // 态度恶劣审核
              if (value.uniqueSign == 'MENU_BAD_ATTITUDE') {
                item.filter(index => {
                  return index.index == '16'
                })[0].subs.push({index: 'badMannersAudit', title: 'yn.no37'})
              }
              // 平账审核列表
              if (value.uniqueSign == 'MENU_ACCOUNTING_REVIEW') {
                item.filter(index => {
                  return index.index == '16'
                })[0].subs.push({index: 'PingZhangAuditList', title: 'auditManage.no2'})
              }

              // 催收管理
              if (value.uniqueSign == 'MENU_COLLECT') {
                item.push({
                  icon: 'el-icon-star-on',
                  index: '8',
                  title: 'sidebar.comeReceiveManage',
                  subs: []
                })
              }
              // 我的催收订单列表
              if (value.uniqueSign == 'MENU_COLLECT_ME') {
                item.filter(index => {
                  return index.index == '8'
                })[0].subs.push({index: 'myCollectionOrderList', title: 'sidebar.myComeOrder'})
              }
              // 我的逾期分期订单列表
              if (value.uniqueSign == 'MENU_COLLECT_ME_OVERDUE_INSTALMENT') {
                item.filter(index => {
                  return index.index == '8'
                })[0].subs.push({index: 'myOverDueInstalment', title: 'add.no6'})
              }
              // 工作分析
              if (value.uniqueSign == 'MENU_COLLECT_ME_WORK_ANALYSIS') {
                item.filter(index => {
                  return index.index == '8'
                })[0].subs.push({index: 'workanalysis', title: 'operationList.crumbsFour'})
              }
              
              // 委外管理
              if (value.uniqueSign == 'MENU_OUTSOURCING_MANAGEMENT') {
                item.push({
                  icon: 'el-icon-news',
                  index: '15',
                  title: 'OutsourcedManage.no1',
                  subs: []
                })
              }
              // 委外订单列表
              if (value.uniqueSign == 'MENU_OUTSOURCING_MANAGEMENT_LIST') {
                item.filter(index => {
                  return index.index == '15'
                })[0].subs.push({index: 'outsourcedorderlist', title: 'OutsourcedManage.no2'})
              }
              // 每日委外统计
              if (value.uniqueSign == 'MENU_ENTRUST_DAILY_REPORT') {
                item.filter(index => {
                  return index.index == '15'
                })[0].subs.push({index: 'everydayoutsourcedtotal', title: 'OutsourcedManage.no3'})
              }
              // 委外催回统计
              if (value.uniqueSign == 'MENU_ENTRUST_REMINDER_STATISTICS') {
                item.filter(index => {
                  return index.index == '15'
                })[0].subs.push({index: 'OutsourceBackTotal', title: 'OutsourcedManage.no31'})
              }
              
              // 客服管理
              if (value.uniqueSign == 'MENU_CUSTOMER_SERVICE') {
                item.push({icon: 'el-icon-news',
                  index: '13',
                  title: 'serviceManage.crumbsOne',
                  subs: []
                })
              }
              // 逾期未还订单列表
              if (value.uniqueSign == 'MENU_CUSTOMER_SERVICE_REFUND') {
                item.filter(index => {
                  return index.index == '13'
                })[0].subs.push({index: 'nobackorderlist', title: 'serviceManage.crumbsTwo'})
              }
              // 我的到期温提列表
              if (value.uniqueSign == 'MENU_CUSTOMER_SERVICE_REMIND') {
                item.filter(index => {
                  return index.index == '13'
                })[0].subs.push({index: 'myovedateremind', title: 'serviceManage.crumbsThree'})
              }
              // 电话来访记录
              if (value.uniqueSign == 'MENU_CUSTOMER_SERVICE_VISIT') {
                item.filter(index => {
                  return index.index == '13'
                })[0].subs.push({index: 'telcomelist', title: 'serviceManage.crumbsFour'})
              }
              // 到期未提统计
              if (value.uniqueSign == 'MENU_CUSTOMER_SERVICE_STATISTICS') {
                item.filter(index => {
                  return index.index == '13'
                })[0].subs.push({index: 'myovedateremindtotal', title: 'serviceManage.crumbsFive'})
              }

              // 统计管理
              if (value.uniqueSign == 'MENU_REPORT') {
                item.push({
                  icon: 'el-icon-menu',
                  index: '9',
                  title: 'sidebar.statisticsManage',
                  subs: []
                })
              }
              // 通过率报表
              if (value.uniqueSign == 'MENU_REPORT_PASS') {
                item.filter(index => {
                  return index.index == '9'
                })[0].subs.push({index: 'passingRate', title: 'sidebar.passRateList'})
              }
              // 逾期率报表
              if (value.uniqueSign == 'MENU_REPORT_INCOME') {
                item.filter(index => {
                  return index.index == '9'
                })[0].subs.push({index: 'overdueRate', title: 'sidebar.firstRateList'})
              }
              // 回款率报表
              if (value.uniqueSign == 'MENU_REPORT_REPAY') {
                item.filter(index => {
                  return index.index == '9'
                })[0].subs.push({index: 'rateOfReturn', title: 'sidebar.backMoneyRateList'})
              }

              // 系统管理
              if (value.uniqueSign == 'MENU_SYSTEM') {
                item.push({icon: 'el-icon-shop-shezhi',
                  index: '7',
                  title: 'sidebar.system',
                  subs: []
                })
              }
              // 账号管理
              if (value.uniqueSign == 'MENU_SYSTEIM_USER') {
                item.filter(index => {
                  return index.index == '7'
                })[0].subs.push({index: 'idmanagement', title: 'sidebar.accountManage'})
              }
              // 权限管理
              if (value.uniqueSign == 'MENU_SYSTEM_RIGHT') {
                item.filter(index => {
                  return index.index == '7'
                })[0].subs.push({index: 'permission', title: 'sidebar.permission'})
              }
              // 客服员列表
              if (value.uniqueSign == 'MENU_SYSTEM_CUSTSERVICE') {
                item.filter(index => {
                  return index.index == '7'
                })[0].subs.push({index: 'servicePeopleList', title: 'staffManage.crumbssix'})
              }
              // 客服小组
              if (value.uniqueSign == 'MENU_SYSTEM_CUSTSERVICE_GROUP') {
                item.filter(index => {
                  return index.index == '7'
                })[0].subs.push({index: 'serviceGroup', title: 'staffManage.service'})
              }
              // 信审员列表
              if (value.uniqueSign == 'MENU_SYSTEM_APPROVE') {
                item.filter(index => {
                  return index.index == '7'
                })[0].subs.push({index: 'creditAuditPeopleList', title: 'staffManage.crumbsTwo'})
              }
              // 信审小组
              if (value.uniqueSign == 'MENU_SYSTEM_APPROVE_GROUP') {
                item.filter(index => {
                  return index.index == '7'
                })[0].subs.push({index: 'creditAuditGroup', title: 'staffManage.crumbsThree'})
              }
              // 催收员列表
              if (value.uniqueSign == 'MENU_SYSTEM_COLLECTION') {
                item.filter(index => {
                  return index.index == '7'
                })[0].subs.push({index: 'collectionPeopleList', title: 'staffManage.crumbsFour'})
              }
              // 催收小组
              if (value.uniqueSign == 'MENU_SYSTEM_COLLECTION_GROUP') {
                item.filter(index => {
                  return index.index == '7'
                })[0].subs.push({index: 'collectionGroup', title: 'staffManage.crumbsFive'})
              }

              // 官网贷款
              if (value.uniqueSign == 'MENU_PC_LOAN') {
                item.push({
                  icon: 'el-icon-menu',
                  index: '17',
                  title: 'websiteLoans.no1',
                  subs: []
                })
              }
              // 用户提交列表
              if (value.uniqueSign == 'MENU_PC_USER_LIST') {
                item.filter(index => {
                  return index.index == '17'
                })[0].subs.push({index: 'usersubmitlist', title: 'websiteLoans.no2'})
              }
              // 我的跟踪订单
              if (value.uniqueSign == 'MENU_PC_USER_ME') {
                item.filter(index => {
                  return index.index == '17'
                })[0].subs.push({index: 'mytailafterorder', title: 'websiteLoans.no3'})
              }
              // 贷款申请列表
              if (value.uniqueSign == 'MENU_PC_LOAN_LIST') {
                item.filter(index => {
                  return index.index == '17'
                })[0].subs.push({index: 'loansapplylist', title: 'websiteLoans.no4'})
              }

              // 电销管理
              if (value.uniqueSign == 'MENU_PHONE_MARKET') {
                item.push({
                  icon: 'el-icon-menu',
                  index: '19',
                  title: 'teleMarketing.no1',
                  subs: []
                })
              }
             // 电销列表
              if (value.uniqueSign == 'MENU_PHONE_MARKET_LIST') {
                item.filter(index => {
                  return index.index == '19'
                })[0].subs.push({index: 'marketing', title: 'teleMarketing.no2'})
              }
              // 我的电销
              if (value.uniqueSign == 'MENU_PHONE_MY_MARKET') {
                item.filter(index => {
                  return index.index == '19'
                })[0].subs.push({index: 'MyMarketing', title: 'teleMarketing.no3'})
              }
              // 每日业绩统计
              if (value.uniqueSign == 'MENU_PHONE_MARKET_PERFORMANCE') {
                item.filter(index => {
                  return index.index == '19'
                })[0].subs.push({index: 'EverydayPerformanceTotal', title: 'teleMarketing.no4'})
              }
              // 每日电销统计
              if (value.uniqueSign == 'MENU_PHONE_MARKET_CONVERT') {
                item.filter(index => {
                  return index.index == '19'
                })[0].subs.push({index: 'EverydayMarketingTotal', title: 'teleMarketing.no5'})
              }
              // 每日渠道转化
              if (value.uniqueSign == 'MENU_PHONE_CHANNEL_TRANSFER') {
                item.filter(index => {
                  return index.index == '19'
                })[0].subs.push({index: 'EverydayChannelTotal', title: 'teleMarketing.no43'})
              }

              // if(_this.headerTitle=='My Dong'||_this.headerTitle=='Get Peso'||_this.headerTitle=='Go Dana'||_this.headerTitle=='EasyCash'||_this.headerTitle=='kilatloan'||_this.headerTitle=='danahidup'||_this.headerTitle=='Flashloan'){
                
                
              // }
              // 系统配置
              if (value.uniqueSign == 'MENU_SYSTEM_CONFIG') {
                item.push({
                  icon: 'el-icon-menu',
                  index: '18',
                  title: 'add.no44',
                  subs: []
                })
              }
              // 规则引擎
              if (value.uniqueSign == 'MENU_RULE_ENGINE') {
                item.filter(index => {
                  return index.index == '18'
                })[0].subs.push({index: 'ruleList', title: 'add.no45'})
              }
              // 配置规则集
              if (value.uniqueSign == 'MENU_RULE_ENGINE') {
                item.filter(index => {
                  return index.index == '18'
                })[0].subs.push({index: 'setRuleGather', title: 'add.no89'})
              }
            }
          })
          this.items = item
        }
      },
      mounted () {
        this.headerTitle = global.config.headerTotal;
        this.sidebar()
        console.log(this.$route.path.replace('/', ''),'111')
      }
    
    }
</script>

<style scoped lang="scss">
    .sidebar{
        display: block;
        position: absolute;
        // background-color: rgba(246, 249, 252, 1);
        width: 270px;
        left: 0;
        top: 94px;
        bottom:0;
        overflow-y: scroll;
        .el-menu-item{
            font-size: 12px;
            padding:0 10px;

        }
        li.el-submenu > div.el-submenu__title{
            font-size: 12px;
        }
    }
    .el-menu-item [class^=el-icon-]{
        font-size: 14px;
    }
    .el-submenu [class^=el-icon-]{
        font-size: 14px;
    }
    .sidebar > ul {
        height:100%;
        
    }
    
    /* .el-menu>li> ul> li.is-active{
        background-color: #1D7BFF;
        color: #ffffff;
    } */
    .el-menu > li.is-active{
        background-color: #1D7BFF !important;
        color: #ffffff !important;
    }
    div.sidebar .el-menu-vertical-demo li.is-opened{
        background-color: #48576a;
    }
    .el-menu>li >ul >li:hover{
        background-color: #1D7BFF !important;
        color: #ffffff;
    }
    .el-submenu__title{
        background-color: #1D7BFF !important;
        color: #ffffff !important;
    }
    
</style>
